import VueRouter from 'vue-router'
import Index from './pages/index/index.vue'
import ManageUsers from './pages/manageUsers/manageUsers.vue'
import Other1 from "./pages/others/other1.vue"
import ManagePermissions from './pages/manageUsers/managePermissions.vue'
import ShowLogs from './pages/manageUsers/showLogs.vue'
import Login from './pages/login/Login.vue'
import ManagerLogin from './pages/login/LoginManager.vue'
// 3. 创建路由对象
var router = new VueRouter({
  routes: [
    {path:'/', redirect:'/login'},
    {path:'/index', redirect:'/index/other1'},
    {path:'/login',component:Login},
    {path:'/login_manager',component:ManagerLogin},
    {
      path:'/index',
      component:Index,
      children: [
        {
          path: 'manage_users',
          component: ManageUsers
        },
        {
          path: 'manage_permissions',
          component: ManagePermissions
        },
        {
          path: 'show_logs',
          component: ShowLogs
        },
        {
          path: 'other1',
          component: Other1
        }
    ]          
    },
  ]
})

// 把路由对象暴露出去
export default router